|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfurny.ga.PseudoSpace
public class PseudoSpace
This is a pseudo implementation of a phenotype space. It only calculates bounds virtually.
Field Summary | |
---|---|
private math.geom2d.polygon.Rectangle2D |
bounds
|
Constructor Summary | |
---|---|
PseudoSpace(float roomWidth,
float roomLength)
Creates a new pseudo phenotype space. |
Method Summary | |
---|---|
boolean |
contains(math.geom2d.polygon.Polygon2D shape)
Checks if a shape is inside the space and does not intersect the bounds. |
math.geom2d.polygon.Rectangle2D |
getOutterBounds()
Gets the outter bounds of the space as rectangle. |
float |
minDistanceToWall(math.geom2d.polygon.Polygon2D shape,
float angle)
Calculates the minimum distance of a shape to a wall. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final math.geom2d.polygon.Rectangle2D bounds
Constructor Detail |
---|
public PseudoSpace(float roomWidth, float roomLength)
roomWidth
- The width in meters.roomLength
- The length in meters.Method Detail |
---|
public boolean contains(math.geom2d.polygon.Polygon2D shape)
IPhenotypeSpace
contains
in interface IPhenotypeSpace
shape
- Shape that has do be in the space.
true
if the shape is fully inside of the space.public math.geom2d.polygon.Rectangle2D getOutterBounds()
IPhenotypeSpace
getOutterBounds
in interface IPhenotypeSpace
public float minDistanceToWall(math.geom2d.polygon.Polygon2D shape, float angle)
IPhenotypeSpace
minDistanceToWall
in interface IPhenotypeSpace
shape
- The shape to check for distance to a wall.angle
- The angle of the shape.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |